package cn.tedu.boot041.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BmiController {
    @RequestMapping("/bmi")
    public String bmi(double height,double weight){
        double bmi = weight/(height*height);
        if(bmi<18){
            return "轻";
        }
        if(bmi<24){
            return "正常";
        }
        if(bmi<28){
            return "沉";
        }
        return "超重";

    }
}
